package com.androiddelphi;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class NovaDiscussao extends Activity implements OnClickListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_nova_discussao);
		
		final Button btSelecionar = (Button) findViewById(R.id.btSel);
		
		btSelecionar.setOnClickListener(this);


	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		final EditText etDiscussao = (EditText) findViewById(R.id.edNova);
		final EditText etDataInicio = (EditText) findViewById(R.id.eTDtI);
		final EditText etDataFim = (EditText) findViewById(R.id.eTDtF);
		
		final String discussao = etDiscussao.getText().toString();
		final String dataInicio = etDataInicio.getText().toString();
		final String dataFim = etDataFim.getText().toString();
		
		Intent i = new Intent(NovaDiscussao.this,Selecione.class);
		i.putExtra("discussao", discussao);
		i.putExtra("dataInicio", dataInicio);
		i.putExtra("dataFim", dataFim);
		startActivityForResult(i, 1);
		
	}


}
